package com.peng.dian.service.impl;

import com.peng.dian.service.searchAudioAndPicture;
import com.peng.dian.utils.commonUtils;
import org.springframework.stereotype.Service;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;

@Service
public class searchAudioAndPictureImpl implements searchAudioAndPicture {

    static HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
    static ArrayList<Object> audio = new ArrayList<>();
    static ArrayList<Object> picture = new ArrayList<>();
    @Override
    public HashMap<Object,Object> searchEmployee() {
        String folderPath = "G:\\beixin_project\\远程资源\\digtalcampus";
        //String folderPath = "your/folder/path";

        // 创建 File 对象
        File folder = new File(folderPath);
        // 遍历文件夹


        commonUtils.listFiles(folder,audio,picture);
        objectObjectHashMap.put("audio",audio);
        objectObjectHashMap.put("picture",picture);
        return objectObjectHashMap;
//        listFiles(folder);
    }
}
